# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py3-zope-component
_pyname=zope.component
pkgver=6.0
pkgrel=1
pkgdesc="Zope Component Architecture"
# Tests install outside python modules via bdist_wheel which fails
options="!check"
url="https://pypi.org/project/zope.component"
arch="noarch"
license="ZPL-2.1"
depends="
	py3-setuptools
	py3-zope-deferredimport
	py3-zope-deprecation
	py3-zope-event
	py3-zope-hookable
	py3-zope-interface
	"
checkdepends="python3-dev libffi-dev" # Required because pypi downloads dependencies for testing
subpackages="$pkgname-pyc"
source="$_pyname-$pkgver.tar.gz::https://github.com/zopefoundation/zope.component/archive/$pkgver.tar.gz"
builddir="$srcdir"/$_pyname-$pkgver

replaces="py-zope-component" # Backwards compatibility
provides="py-zope-component=$pkgver-r$pkgrel" # Backwards compatibility

build() {
	python3 setup.py build
}

check() {
	python3 setup.py test
}

package() {
	python3 setup.py install --skip-build --root="$pkgdir"
}

sha512sums="
0f27ce6a901d780d0ff35718698b140d8f4763fed14f95a483ce984e55e25b54a35c5dfde9205dbf8436e96b6f3ecb4b560a46cf5bc8ccd3875b859796b0c1e9  zope.component-6.0.tar.gz
"
